package com.kds.changzhou.utility;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;

/**
 * @author 孔德嵩
 * @date 2023-11-07 10:57
 * @copyright Copyright (c) 2023 Dell
 */
@Configuration
public class XmlConfig {

    @Bean
    public DocumentBuilderFactory documentBuilderFactory() {
        return DocumentBuilderFactory.newInstance();
    }

    @Bean
    public DocumentBuilder documentBuilder() throws Exception {
        return documentBuilderFactory().newDocumentBuilder();
    }
}
